var ckdz_app = function(){
	var path = Constants.amUrlPath;
	var ddid = manager.findParamFromUrl("ddid");
	var ckdzUrl = path+"zyddgl/getDdwlxx?ddid="+ddid; 
	function  loadDz(){
		var ckdzRactive = new Ractive({
			el: ".ckdz-container",
			template: "#ckdz-template",
			onrender: function(){
			},
			oncomplete: function(){
				$.get(ckdzUrl, function(data){
					ckdzRactive.set("dhwlxx",data);
					if(data.shr != null && data.shr.length > 10){
						data.shr = data.shr.substring(0, 10) + "...";
					}
					if(data.shrdhhm != null && data.shrdhhm.length > 11){
						data.shrdhhm = data.shrdhhm.substring(0, 11) + "...";
					}
					if(data.shxxdz != null && data.shxxdz.length > 55){
						data.shxxdz = data.shxxdz.substring(0, 55) + "...";
					}
					ckdzRactive.set("dhwlxx.shr_short",data.shr);
					ckdzRactive.set("dhwlxx.shrdhhm_short",data.shrdhhm);
					ckdzRactive.set("dhwlxx.shxxdz_short",data.shxxdz);
					
				});
			}
		})
	}
	
	return {
		init: function(){
			loadDz();
		}
	}
}();
$(document).ready(ckdz_app.init)